<template>
    <div class="form-block-inner">
        <Form :model="formItem" label-position="top" ref="baseForm">
            <div class="title-style">影印材料</div>
            <common-files-upload :show-files-list="fileList" @result="resultAction"></common-files-upload>
            <common-save-btn v-if="false"></common-save-btn>
        </Form>
    </div>
</template>

<script>
import CommonSaveBtn from '@/components/common-save-btn/index'
import CommonFilesUpload from '@/components/comon-files-upload/index'

export default {
  name: 'ZiZhuanInfo',
  components: { CommonFilesUpload, CommonSaveBtn },
  props: {
    formItem: {
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  data () {
    return {
      fileList: [
        {
          name: '自传材料(2-1-1-1 至 2-1-1-100)',
          value: '',
          key: { a: 2, b: 1 },
          desc: '自传。个人撰写自己家世、身世和主要社会关系的自述,以第一人称叙述自己的经历,是本人成长过程、思想演变的历史记录。包括本人历次所写自传(思想自传、历史自传、反省自传、小史、小传)、参加党的重大教育活动情况和重要党性分析、重要思想汇报及带有自传性质的材料;一些以自传为主的厦历或简历表\n'
        },
        { name: '带有自传内容的其他材料(2-2-1-1 至 2-2-1-100)', value: '', key: { a: 2, b: 2 } }
      ]
    }
  },
  watch: {
    formItem (data) {
      console.log('监听formItem')
      this.fileList[0].value = data.two_one
      this.fileList[1].value = data.two_two
    }

  },
  methods: {
    resultAction (data) {
      this.formItem.two_one = data[0].value
      this.formItem.two_two = data[1].value
    }
  }
}
</script>

<style scoped>

</style>
